let t = require;
let  e = module
let  o =  e.exports;
 o.default =  e.exports;

                'use strict';
                console.log("start");
                var _n18,
                    i =
                    (this && this.__extends) ||
                    ((_n18 = function n(t, e) {
                            return (_n18 =
                                Object.setPrototypeOf ||
                                ({
                                        __proto__: []
                                    }
                                    instanceof Array &&
                                    function(t, e) {
                                        t.__proto__ = e;
                                    }) ||
                                function(t, e) {
                                    for (var o in e) {
                                        Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o]);
                                    }
                                })(t, e);
                        }),
                        function(t, e) {
                            function o() {
                                this.constructor = t;
                            }
                            _n18(t, e),
                                (t.prototype =
                                    null === e ?
                                    Object.create(e) :
                                    ((o.prototype = e.prototype), new o()));
                        });
                Object.defineProperty(o, '__esModule', {
                        value: !0
                    }),
                    (o.AbsScene = o.SceneEvent = void 0);
                var r,
                    a = t('AbsObject'),
                    s = t('AbsActor');
                (function(t) {
                    (t.Enter = 'SCE_EVENT_ENTER'),
                    (t.Exit = 'SCE_EVENT_EXIT'),
                    (t.Start = 'SCE_EVENT_START'),
                    (t.End = 'SCE_EVENT_END'),
                    (t.StartLoad = 'SCE_EVENT_STARTLOAD'),
                    (t.Loading = 'SCE_EVENT_LOADING'),
                    (t.LoadErr = 'SCE_EVENT_LOADERR'),
                    (t.EndLoad = 'SCE_EVENT_ENDLOAD'),
                    (t.AddActor = 'SCE_EVENT_ADDACTOR'),
                    (t.RemoveActor = 'SCE_EVENT_REMOVEACTOR'),
                    (t.ToxicChanged = 'SCE_EVENT_TOXICCHANGED');
                })((r = o.SceneEvent || (o.SceneEvent = {})));
                var c = (function(t) {
                    function e(e) {
                        void 0 === e && (e = 0);
                        var o = t.call(this) || this;
                        return (
                            (o._entity = new cc.Node('scene.' + e)),
                            (o._shadow = new cc.Node()),
                            o._shadow.setParent(o._entity),
                            (o._root = new cc.Node()),
                            o._root.setParent(o._entity),
                            (o._id = e),
                            (o._actors = []),
                            (o._addActorList = []),
                            (o._remvoeActorList = []),
                            (o._effects = []),
                            (o._addEffectList = []),
                            (o._remvoeEffectList = []),
                            o
                        );
                    }
                    return (
                        i(e, t),
                        Object.defineProperty(e.prototype, 'id', {
                            get: function get() {
                                return this._id;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        Object.defineProperty(e.prototype, 'entity', {
                            get: function get() {
                                return this._entity;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.pause = function() {
                            this._isPause = !0;
                            for (var t = 0; t < this._actors.length; t++) {
                                this._actors[t].pause();
                            }
                        }),
                        (e.prototype.resume = function() {
                            this._isPause = !1;
                            for (var t = 0; t < this._actors.length; t++) {
                                this._actors[t].resume();
                            }
                        }),
                        Object.defineProperty(e.prototype, 'actors', {
                            get: function get() {
                                return this._actors;
                            },
                            enumerable: !1,
                            configurable: !0
                        }),
                        (e.prototype.getActor = function(t) {
                            if (this._actors)
                                for (var e = 0; e < this._actors.length; e++) {
                                    var o = this._actors[e];
                                    if (!o.isDestroy && o.id == t) return o;
                                }
                            return null;
                        }),
                        (e.prototype.addShadow = function(t, e) {
                            (t.shadow = e),
                            e instanceof s.AbsActor ?
                                this._shadow.addChild(e.entity) :
                                this._shadow.addChild(e);
                        }),
                        (e.prototype.addActor = function(t) {
                            t &&
                                !t.isDestroy &&
                                this._addActorList &&
                                (this._addActorList.push(t),
                                    (t.scene = this),
                                    this.emit(r.AddActor, t));
                        }),
                        (e.prototype.removeActor = function(t, e) {
                            void 0 === e && (e = !1),
                                t &&
                                !t.isDestroy &&
                                this._remvoeActorList &&
                                (e && (t.state = s.ActorState.Recycle),
                                    this._remvoeActorList.push(t),
                                    this.emit(r.RemoveActor, t));
                        }),
                        (e.prototype.addEffect = function(t) {
                            t &&
                                !t.isDestroy &&
                                this._addEffectList &&
                                (this._addEffectList.push(t), (t.scene = this));
                        }),
                        (e.prototype.removeEffect = function(t, e) {
                            void 0 === e && (e = !1),
                                t &&
                                !t.isDestroy &&
                                this._remvoeEffectList &&
                                (e && (t.state = s.ActorState.Recycle),
                                    this._remvoeEffectList.push(t));
                        }),
                        (e.prototype.clearEffects = function() {
                            for (var t = 0; t < this._effects.length; t++) {
                                this.removeEffect(this._effects[t], !0);
                            }
                        }),
                        (e.prototype.update = function(t) {
                            if (!this._isPause) {
                                if (this._actors) {
                                    var e = void 0,
                                        o = void 0;
                                    if (this._remvoeActorList.length > 0) {
                                        for (var n = 0; n < this._remvoeActorList.length; n++) {
                                            if ((e = this._remvoeActorList[n]))
                                                for (var i = 0; i < this._actors.length; i++) {
                                                    if ((o = this._actors[i]) && o.objId == e.objId) {
                                                        this._actors.splice(i, 1),
                                                            (o.entity.parent = null),
                                                            (o.scene = null),
                                                            o.state == s.ActorState.Recycle && o.destroy();
                                                        break;
                                                    }
                                                }
                                        }
                                        this._remvoeActorList.splice(
                                            0,
                                            this._remvoeActorList.length
                                        );
                                    }
                                    if (this._addActorList.length > 0) {
                                        for (n = 0; n < this._addActorList.length; n++) {
                                            (o = this._addActorList[n]) &&
                                            (this._actors.push(o), this._root.addChild(o.entity));
                                        }
                                        this._addActorList.splice(0, this._addActorList.length);
                                    }
                                    for (n = 0; n < this._actors.length; n++) {
                                        (e = this._actors[n]).update(t),
                                            e.state == s.ActorState.Recycle &&
                                            this.removeActor(e, !0);
                                    }
                                    if (this._remvoeEffectList.length > 0) {
                                        for (n = 0; n < this._remvoeEffectList.length; n++) {
                                            if ((e = this._remvoeEffectList[n]))
                                                for (i = 0; i < this._effects.length; i++) {
                                                    if ((o = this._effects[i]) && o.objId == e.objId) {
                                                        this._effects.splice(i, 1),
                                                            (o.entity.parent = null),
                                                            (o.scene = null),
                                                            o.state == s.ActorState.Recycle && o.destroy();
                                                        break;
                                                    }
                                                }
                                        }
                                        this._remvoeEffectList.splice(
                                            0,
                                            this._remvoeEffectList.length
                                        );
                                    }
                                    if (this._addEffectList.length > 0) {
                                        for (n = 0; n < this._addEffectList.length; n++) {
                                            (o = this._addEffectList[n]) &&
                                            (this._effects.push(o),
                                                null == o.entity.parent &&
                                                this._root.addChild(o.entity));
                                        }
                                        this._addEffectList.splice(0, this._addEffectList.length);
                                    }
                                    for (n = 0; n < this._effects.length; n++) {
                                        (e = this._effects[n]).update(t),
                                            e.state == s.ActorState.Recycle &&
                                            this.removeActor(e, !0);
                                    }
                                }
                                this.onUpdate(t);
                            }
                        }),
                        (e.prototype.onUpdate = function() {}),
                        (e.prototype.onDestroy = function() {
                            if ((t.prototype.onDestroy.call(this), this._entity)) {
                                for (var e = 0; e < this._actors.length; e++) {
                                    this._actors[e].destroy();
                                }
                                for (
                                    this._actors = null, e = 0; e < this._addActorList.length; e++
                                ) {
                                    this._addActorList[e].destroy();
                                }
                                for (
                                    this._addActorList = null, e = 0; e < this._remvoeActorList.length; e++
                                ) {
                                    this._remvoeActorList[e].destroy();
                                }
                                for (
                                    this._remvoeActorList = null, e = 0; e < this._effects.length; e++
                                ) {
                                    this._effects[e].destroy();
                                }
                                for (
                                    this._effects = null, e = 0; e < this._addEffectList.length; e++
                                ) {
                                    this._addEffectList[e].destroy();
                                }
                                for (
                                    this._addEffectList = null, e = 0; e < this._remvoeEffectList.length; e++
                                ) {
                                    this._remvoeEffectList[e].destroy();
                                }
                                (this._remvoeEffectList = null),
                                this._entity.parent && this._entity.removeFromParent(!0),
                                    (this._entity = null);
                            }
                        }),
                        (e.prototype.reconnect = function() {}),
                        e
                    );
                })(a.AbsObject);
                (o.AbsScene = c), console.log("end");
            module.exports =  e.exports;